package com.spring.soundsystem.Main;

import com.spring.soundsystem.SpringAOP.UserService;
import com.spring.soundsystem.config.AppConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

public class Main {
    public static void main(String[] args){
        ApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class);
        UserService userService = ctx.getBean(UserService.class);
        //userService.sayHello("Li lei");
        userService.sayHello("Li lei");
        userService.addUser("Li lei", "123");
        userService.getUserId(1);
        userService.sayBey("HanMeimei");

    }
}
